package com.hm.cms.domain;

import java.util.Date;

import org.springframework.data.mongodb.core.index.CompoundIndex;
import org.springframework.data.mongodb.core.index.CompoundIndexes;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;

import com.hm.cms.auto.su.BaseDomain;
import com.hm.cms.auto.su.R;

import lombok.Getter;
import lombok.Setter;

/**
 * @author shishun.wang
 * @date 下午1:37:41 2017年10月13日
 * @version 1.0
 * @describe 文章
 */
@Setter
@Getter
@Document(collection = R.Database.prefix + "ARTICLE")
@CompoundIndexes({ @CompoundIndex(name = "source_uri", def = "{'source_uri': 1}"),
		@CompoundIndex(name = "create_time", def = "{'create_time': 1}"),
		@CompoundIndex(name = "article_order", def = "{'article_order': 1}"),
		@CompoundIndex(name = "author_name", def = "{'author_name': 1}") })
public class ArticleDomain extends BaseDomain {

	private static final long serialVersionUID = 1L;

	/**
	 * 作者名字
	 */
	@Field(value = "author_name")
	private String authorName;

	/**
	 * 发布时间
	 */
	@Field(value = "release_time")
	private Date releaseTime;

	/**
	 * 标题
	 */
	private String title;

	/**
	 * 关键字
	 */
	private String keywords;

	/**
	 * 缩略图
	 */
	@Field(value = "breviary_icon")
	private String breviaryIcon;

	/**
	 * 文章摘录
	 */
	@Field(value = "article_excerpt")
	private String articleExcerpt;

	/**
	 * 静态化页面地址
	 */
	@Field(value = "staticize_uri")
	private String staticizeUri;

	/**
	 * 数据来源名称
	 */
	@Field(value = "source_name")
	private String sourceName;

	/**
	 * 数据来源地址
	 */
	@Field(value = "source_uri")
	private String sourceUri;

	/**
	 * 排序，编辑顺序递增,方便对上一页下一页处理
	 */
	@Field(value = "article_order")
	private Integer articleOrder;

}
